{extend name="layout/tpl" /}
{block name="title"}{$title ?? ''}{/block}
{block name="css"}
{__block__}
<style type="text/css">
	.layui-col-sm20{
		width:20%;
		float: left;
	}
	h3{font-weight: 700;
		text-align: center;}
	.newCommonListStyle{
		width:100%;
		margin:10px 0;
	}
	.newCommonListStyle .newListTableBg {
		padding:5px 0;
	}
	#list{width: 100%;text-align: left;}
	#list th{
		padding: 15px 15px 15px 0;
		font-size: 16px;
	}
	#list div.line{margin-bottom: 5px;text-align: center;}
	#list .team{margin-left: 15px;}
	#list .team a{color: #666666;}
	#list .match_time{font-weight: bold;}
	#list .score{font-weight: bold;}
	#list .score-gray{color: gray;}
	#list .score-red{color: #ff3d3d;}
	#list .score-brown{color: brown;}
	#list .score-blue{color: blue;}
	#list .score-green{color: #229c1d;}
	#list .date{padding: 5px;}

	.team-list{min-height: 950px;}
	.active{ color: #ec4fff!important;font-weight: 700; }
</style>
{/block}
{block name="content"}
{__block__}
<div class="newCommonListStyle">

	<div class="weadmin-body layui-fluid"  >
		<div class="clear"></div>
	</div>

	<div class="newListTableBg"  style="width: auto;">
		<table id="list">
			<thead style="display: none;">
			<!--<th>日期</th>-->
			{foreach $country_array as $id =>$name }
			<th width="auto" style="text-align: center;">
				{$name }
			</th>
			{/foreach}
			</thead>
			<tbody></tbody>
		</table>
		<hr />
		<div class="team-list" style="">
			<iframe src="" frameborder="0"  id="team-main" class="team-list" style="min-width: 100%"></iframe>
		</div>

	</div>

	<script type="text/html" id="toolbar">
		<div class="weadmin-block" >

		</div>
	</script>

</div>


{/block}

{block name="footerjs"}
{__block__}
<script src="/static/js/score.js?v={$version}"></script>
<script>
	var team_id = '{:input("team_id") }';
	var data = {:$special_team };
	console.log(data,'data')
	getList = function () {
		var form = layui.form;
		var laypage = layui.laypage //分页
				,table = layui.table //表格
				,laydate = layui.laydate//日期
				,$ = layui.$
		;


		var html = '',beginIndex = 1;
		html += '<tr>';
		for(var d in data){
			html += '<td>';

			for(var j in data[d]){
				html += '<div valign="top" >';
				if( typeof data[d][j] != 'undefined'){
					var item = data[d][j];
					html += '<div class="line">';
					html += '<span class="team">' +
							'<a style="cursor: pointer;" onclick="javastript:showNoticeDetail(this);" url="/Analyse/notice?team_id=' + item.team_id  + '&title=' + item.title + '">' + item.title + '</a>' +
							'</span>' +
							'</div>';

					html += '</div>';

				}
				html += '</div>';
			}
			html += '</td>';
		}
		html += '</tr>';
		html += '<tr><td colspan="10"></td></tr>';

		;
		$('#list>tbody').html(html);
	}

	layui.use(['laypage','table','form','laydate','soulTable'], function () {
		var form = layui.form
				,laypage = layui.laypage //分页
				,table = layui.table //表格
				,laydate = layui.laydate//日期
				,$ = layui.$
		;
		if(typeof getList == 'function') getList();
		form.on('submit(submit)',function(data){
			getList();
			return false;   // 阻止表单跳转
		});
	});

	showNoticeDetail = function(that){
		var url = $(that).attr('url');
		$('#team-main').attr('src',url);
		$('.team a').removeClass('active');
		$(that).addClass('active');
	}

	$(document).ready(function () {
	});
	//回车进行搜索
	$(document).keydown(function(event){
		if(event.keyCode==13){
			$('button[data-type="search"]').click();
		}
	});

</script>
{/block}
